package br.com.colegio.dao;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import br.com.colegio.dao.storage.Storage;

public class FinanceiroContaDAO {/*
	public static Collection<Object> list(){
		try {
			return Storage.select(FinanceiroConta.class.getName(),null);
		}
		catch(Exception e){
			e.printStackTrace();
		}
		return null;
	}

	public static FinanceiroConta get(Long cod){
		try {
			Object r = Storage.get(FinanceiroConta.class.getName(),cod);
			if(r != null) return (FinanceiroConta)r;
		}
		catch(Exception e){
			e.printStackTrace();
		}
		return null;
	}

	public static Collection<Object> getByTipo(String t){
		try {
			String params = "String t1";
			String filter = "";

			if(t != null) filter = "tipo = t1";

			Map<String,Object> parVal = new HashMap<String,Object>();
			parVal.put("t1",t);

			return Storage.select(FinanceiroConta.class.getName(),filter,params,parVal,null);
		}
		catch(Exception e){
			e.printStackTrace();
		}
		return null;
	}

	public static FinanceiroConta save(FinanceiroConta reg) throws Exception {
		return (FinanceiroConta)Storage.save(reg);
	}

	public static void delete(Long reg) throws Exception {
		Storage.delete(FinanceiroConta.class.getName(),reg);
	}*/
}
